package event

import (
	"beergo/app/sys/models"
	"beergo/lib/event"
	"github.com/beego/beego/v2/server/web/context"
)

func init() {
	event.ListenJoin("sys.UserNew", func(v interface{}, ctx *context.Context) {
		model,ok:=v.(*models.User)
		if ok {
			model.Password = "123456"
		}
	})
}
